import request from '@/utils/request'

// 获取分页列表？？？？？
export function WorkFlowGetPage(pd) {
    return request({
        url: '/sys/workflow/getPage',
        method: 'get',
        params: pd
    })
}

// 获取列表
export function WorkFlowGetList(pd) {
    return request({
        url: '/sys/workflow/getList',
        method: 'get',
        params: pd
    })
}

// 获取条数
export function WorkFlowGetCount(pd) {
    return request({
        url: '/sys/workflow/getCount',
        method: 'get',
        params: pd
    })
}

// 新增
export function WorkFlowAdd(data) {
    return request({
        url: '/sys/workflow',
        method: 'post',
        data: data
    })
}

// 修改
export function WorkFlowEdit(pd) {
    return request({
        url: '/sys/workflow',
        method: 'put',
        data: pd
    })
}

// 删除参数配置
export function WorkFlowDel(id) {
    return request({
        url: '/sys/workflow/id/' + id,
        method: 'delete'
    })
}

//============子表数据增删改查=====================

// 获取列表
export function WorkFlowGetLineList(pd) {
    return request({
        url: '/sys/workflow/getLineList',
        method: 'get',
        params: pd
    })
}

// 获取条数
export function WorkFlowGetLineCount(pd) {
    return request({
        url: '/sys/workflow/getLineCount',
        method: 'get',
        params: pd
    })
}

// 新增
export function WorkFlowAddLine(data) {
    return request({
        url: '/sys/workflow/line',
        method: 'post',
        data: data
    })
}

// 修改
export function WorkFlowEditLine(pd) {
    return request({
        url: '/sys/workflow/line',
        method: 'put',
        data: pd
    })
}

// 删除参数配置
export function WorkFlowDelLine(lineId) {
    return request({
        url: '/sys/workflow/lineId/' + lineId,
        method: 'delete'
    })
}

// 审批+权限
export function WorkFlowAuthorize(lineId,result) {
    return request({
        url: '/sys/workflow/authorize/' + lineId,
        method: 'post',
        params: {result}
    })
}